

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加修改</title>
    {include file="include/top"}
    <style>
        .layui-form-item .layui-input-inline{width: 80%;}
        #LAY_layedit_2{background: #fff;}
        .layui-input-inline input{border: 0;margin-right: 20px;text-indent: 10px;}
    </style>
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-app-form-tags" style="padding: 20px 0 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">时间</label>
        <div class="layui-input-inline" style="display: flex;">
            <input type="text" value="周日" readonly>
            <input type="text" value="周一" readonly>
            <input type="text" value="周二" readonly>
            <input type="text" value="周三" readonly>
            <input type="text" value="周四" readonly>
            <input type="text" value="周五" readonly>
            <input type="text" value="周六" readonly>
        </div>
    </div>
    {foreach $data['prices'] as $v}
    <div class="layui-form-item priceList" >
        <label class="layui-form-label">{$v.prices[0]}</label>
        <div class="layui-input-inline" style="display: flex">
            <input type="number" name="a0" value="{$v.prices[1]}" placeholder="请输入..." autocomplete="off">
            <input type="number" name="a1" value="{$v.prices[2]}" placeholder="请输入..." autocomplete="off">
            <input type="number" name="a2" value="{$v.prices[3]}" placeholder="请输入..." autocomplete="off">
            <input type="number" name="a3" value="{$v.prices[4]}" placeholder="请输入..." autocomplete="off">
            <input type="number" name="a4" value="{$v.prices[5]}" placeholder="请输入..." autocomplete="off">
            <input type="number" name="a5" value="{$v.prices[6]}" placeholder="请输入..." autocomplete="off">
            <input type="number" name="a6" value="{$v.prices[7]}" placeholder="请输入..." autocomplete="off">
        </div>
    </div>
    {/foreach}
    <div class="layui-form-item">
        <label class="layui-form-label">清空</label>
        <div class="layui-input-inline" style="display: flex">
            <button class="layui-btn" id="clearPrice">清空详细清单 采用统一百分比</button>
        </div>
    </div>

</div>

{include file="include/js"}
<script>
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form'],function () {
        var $=layui.$;
        var form=layui.form;
        var id={$data.id?$data.id : 0}

        $("#clearPrice").click(function (){
            layer.confirm("是否确定清空单独定价？",function (){
                $.post("gasLocalSave",{clear:true,id:id},function (re){
                    layer.closeAll()
                    layer.msg(re.msg)
                })
            })
        })
    });
</script>
</body>
</html>